# Go parameters


GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get

CPS=cps

.PHONY: all
all: build
install:
	@echo "@Install to ${GOPATH}/bin"
	mkdir -p $(GOPATH)/bin
	mkdir -p $(GOPATH)/conf
	mkdir -p $(GOPATH)/log
	cp -f $(CPS) $(GOPATH)/bin/
	cp -rf conf/ $(GOPATH)/
	cp -rf static/ $(GOPATH)/bin/
	cp -rf views/ $(GOPATH)/bin/

clean:
	@echo "@Clean workspace"
	$(GOCLEAN)
	rm -f $(GOPATH)/bin/$(CPS)
	rm -rf $(GOPATH)/bin/static
	rm -rf $(GOPATH)/bin/views

build:  
	@echo "@Building ..."
	$(GOBUILD) -v -gcflags="-N -l" $(CPS)
	


